package net.xdclass.filter;

import net.xdclass.po.OrderItem;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.stereotype.Component;

@Component
public class TestDataFilterItemProcessor implements ItemProcessor<OrderItem, OrderItem> {
    @Override
    public OrderItem process(OrderItem item) {
        // 返回null，会过滤掉这条数据
        return "8".equals(item.getUserId()) ? null : item;
    }
}
